// app.js
App({
  onLaunch() {
    wx.getSystemInfo({
      success: (result) => {
        this.globalData.userInfo.barHeight=result.statusBarHeight // 获取顶部状态栏的高度
      },
    })
    let info=wx.getMenuButtonBoundingClientRect() // 获取胶囊的位置信息
    this.globalData.userInfo.top=info.top
    this.globalData.userInfo.bottom=info.bottom
    this.globalData.userInfo.height=info.height
  },
  globalData: {
    userInfo: {
      barHeight:0,
      top:0,
      bottom:0,
      height:0
    }
  }
})
